#include <bits/stdc++.h>

using namespace std;

int main () {
    int nums;
    cin >> nums;
    vector<int> candey_nums(nums);
    int tmp;
    for (int i=0; i < nums; ++i) {
        cin >> tmp;
        // cout << tmp;
        candey_nums[i] = tmp;
    }

    if (nums < 2) {
        cout << "-1";
    }
    int total_candy_num = accumulate(candey_nums.begin(), candey_nums.end(), 0);;
    if ((total_candy_num/2*2) != total_candy_num ) {
        cout << "-1";
    } else {
        
    }

    return 0;
}